import { fileURLToPath, URL } from "node:url";

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    host: "localhost",
    port: 9527,
    open: true
    // proxy是代理
  },
  resolve: {
    alias: {
      "@": fileURLToPath(new URL("./src", import.meta.url)),
      "@v": fileURLToPath(new URL("./src/views", import.meta.url)),
      "@a": fileURLToPath(new URL("./src/api", import.meta.url)),
      "@u": fileURLToPath(new URL("./src/utils", import.meta.url)),
    },
  },
});
